$OpenBSD: patch-cgi_showlog_c,v 1.2 2017/02/07 21:40:06 sthen Exp $
--- cgi/showlog.c.orig	Thu Dec 22 21:40:50 2016
+++ cgi/showlog.c	Tue Feb  7 21:24:21 2017
@@ -177,8 +177,8 @@ int main(void) {
 
 		/* start input form */
 		printf("<form method='GET' style='margin:0;' action='%s'>\n", SHOWLOG_CGI);
-		printf("<input type='hidden' name='ts_start' value='%lu'>\n", ts_start);
-		printf("<input type='hidden' name='ts_end' value='%lu'>\n", ts_end);
+		printf("<input type='hidden' name='ts_start' value='%llu'>\n", (long long)ts_start);
+		printf("<input type='hidden' name='ts_end' value='%llu'>\n", (long long)ts_end);
 		printf("<input type='hidden' name='limit' value='%d'>\n", result_limit);
 
 		/* begin top table */
@@ -793,11 +793,11 @@ void display_logentries() {
 				if (json_start == FALSE)
 					printf(",\n");
 				json_start = FALSE;
-				printf("{ \"timestamp\": %lu, ", temp_entry->timestamp);
+				printf("{ \"timestamp\": %llu, ", (long long)temp_entry->timestamp);
 				printf(" \"date_time\": \"%s\", ", date_time);
 				printf(" \"log_entry\": \"%s\"}", json_encode(temp_entry->entry_text));
 			} else if (content_type == CSV_CONTENT) {
-				printf("%s%lu%s%s", csv_data_enclosure, temp_entry->timestamp, csv_data_enclosure, csv_delimiter);
+				printf("%s%llu%s%s", csv_data_enclosure, (long long)temp_entry->timestamp, csv_data_enclosure, csv_delimiter);
 				printf("%s%s%s%s", csv_data_enclosure, date_time, csv_data_enclosure, csv_delimiter);
 				printf("%s%s%s\n", csv_data_enclosure, temp_entry->entry_text, csv_data_enclosure);
 			} else {
